<template>
  <div class="home">
    <mt-header fixed title="O2O资源回收平台"></mt-header>
    <div class="header">
      <mt-swipe :auto="2000">
        <mt-swipe-item class="pc">
          <img src="../../assets/img/bg.jpg" />
        </mt-swipe-item>
        <mt-swipe-item class="pc">
          <img src="../../assets/img/bg2.jpg" />
        </mt-swipe-item>
      </mt-swipe>
    </div>
    <mt-tabbar v-nodel="selected">
      <mt-tab-item id="manage">
        <img slot="icon" src="../../assets/img/person.png" @click="showOrder"/>
        订单管理
      </mt-tab-item>
      <mt-tab-item id="order">
        <img slot="icon" src="../../assets/img/person.png" @click="newOrder"/>
        新建订单
      </mt-tab-item>
      <mt-tab-item id="person">
        <img slot="icon" src="../../assets/img/person.png" @click="showPerInfo"/>
        个人信息
      </mt-tab-item>
    </mt-tabbar>
    <!--<footer class="page-footer" id="footer">
      <ul>
        <li class="manage">
          <img src="../assets/img/person.png" />
        </li>
        <li class="order">
          <img src="../assets/img/person.png" />
        </li>
        <li class="personal">
          <img src="../assets/img/person.png" />
        </li>
      </ul>
    </footer>-->
  </div>
</template>

<script>
  export default {
    name: "home",
    data(){
      return{
      }
    },
    methods:{
      showOrder(){
        this.$router.push({path: '/user/orders'})
        // console.log(this.$store.state.user_id);
      },
      newOrder(){
        this.$router.push({path: '/user/order'})
      },
      showPerInfo(){
        this.$router.push({path: '/user/person'})
      }
    }
  }
</script>

<style scoped>
  .home {
    background-color: #fff;
    width: 100%;
    height: 100%;
  }

  .header {
    width: 100%;
    height: 220px;
    position:relative;
    margin-top: 30px;
    overflow: hidden;
  }

  .header .pc {
    position: relative;
    width: 100%;
    height:220px;
  }

  .header .pc img {
    width: 100%;
    height: 100%;
  }

  .pc {
    position: relative;
    width: 100%;
    height:220px;
  }

  .pc img {
    width: 100%;
    height: 100%;
  }

  .page-footer {
    width: 100%;
    height: 10%;
    background-color: #efedef;
    position: fixed;
    bottom: 0;
    left: 0;
  }

  .page-footer ul li {
    width: 33.3%;
    float: left;
    text-align: center;
    margin-top: 3px;
  }

  .page-footer ul li img {
    margin-top: 10px;
    width: 33.3%;
  }
</style>
